package com.pattern.Adapter;

/**
 *  使用继承的方法进行适配
 */
public class PrintBannerWithExtends extends Banner implements Print{

    public PrintBannerWithExtends(String adds) {
        super(adds);
    }

    public String printWeak() {
        return showWithParen();
    }

    public String printStrong() {
        return showWidthStar();
    }

    public static void main(String[] args) {
        Print print = new PrintBannerWithExtends("I am zhangxin, I am learning patten");
        String strongAdd = print.printStrong();
        String weakAdd = print.printWeak();
        System.out.println(strongAdd);
        System.out.println(weakAdd);
    }

}
